package com.qg.rta;

import com.qg.rta.dto.request.RtaCommonRequest;
import org.apache.commons.lang3.StringUtils;

public class DeviceUtil {


    /**
     * 去掉了
     * @param rtaCommonRequest
     * @return
     */
    public static boolean getDeviceId(RtaCommonRequest rtaCommonRequest) {
        if(StringUtils.isNotBlank(rtaCommonRequest.getOaid())){
            if(rtaCommonRequest.getOaid().contains("00000000")){
                rtaCommonRequest.setOaid(null);
            }
        }

      if(StringUtils.isBlank(rtaCommonRequest.getImei())&&
              StringUtils.isBlank(rtaCommonRequest.getOaid())&& StringUtils.isBlank(rtaCommonRequest.getHash_android_id())
              &&StringUtils.isBlank(rtaCommonRequest.getImeiSum())&&StringUtils.isBlank(rtaCommonRequest.getOaidSum())){
          return  true;
      }else {
          return false;
      }
    }
}
